﻿using BIS.Utility.DAL.DataMapper;
using BIS.Utility.Converter;

namespace BIS.Portal.Modules.CMS.Entity
{
    public class ClientCmsArticleFreeTextEntity : IEntity
    {

        #region Private member

        private int _article_id;
        private string _article_title;
        private string _article_content;

        #endregion
        #region Contructor

        public ClientCmsArticleFreeTextEntity()
        {
        }

        public ClientCmsArticleFreeTextEntity(int articleId, string articleTitle, string articleContent)
        {
            _article_id = articleId;
            _article_title = articleTitle;
            _article_content = articleContent;
        }

        #endregion
        #region Pulbic properties

        public int ArticleId
        {
            get { return _article_id; }
            set { _article_id = value; }
        }

        public string ArticleTitle
        {
            get { return _article_title; }
            set { _article_title = value; }
        }

        public string ArticleContent
        {
            get { return _article_content; }
            set { _article_content = value; }
        }

        #endregion

        #region Implement From IEntity Member

        public void Fill(System.Data.IDataReader reader)
        {
            ArticleId = Functions.GetInt(reader["article_id"]);
            ArticleTitle = Functions.GetString(reader["article_title"]);
            ArticleContent = Functions.GetString(reader["article_content"]);
        }
        #endregion

    }
}
